//
//  HomePageViewController.m
//  Maylida
//
//  Created by laojingxing on 2017/9/5.
//  Copyright © 2017年 laojingxing. All rights reserved.
//

#import "HomePageViewController.h"
#import "HttpNetworkManager.h"
#import "TextModel.h"
#import "NetworkRequest.h"

@interface HomePageViewController ()

@end

@implementation HomePageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.title = kHomeTitle;
    
    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"File" ofType:@"json"];
    NSData *data = [NSData dataWithContentsOfFile:filePath];
    NSDictionary *dicArr = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];

    NSMutableArray *arr = [NSMutableArray array];
    for (NSDictionary *subDic in dicArr[@"data"]) {
        [arr addObject:[TextModel instanceWithDict:subDic]];
    }


}


- (void)viewWillAppear:(BOOL)animated {
    
    [kHTTPManager postRequestWithUrl:@"http://192.168.11.12:8080/Severlet/Test" parameters:nil successBlock:^(id task, id responseObject) {
        NSLog(@"res%@", responseObject);
    } failureBlock:^(id task, NSError *error) {
        
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
